gl: Clean up pre-requisite checks for GdkGLContext setters
authorEmmanuele Bassi <ebassi@gnome.org>
Mon, 9 Feb 2015 16:08:43 +0000 (16:08 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Mon, 9 Feb 2015 19:10:30 +0000 (19:10 +0000)
We don't support non-core profiles.

https://bugzilla.gnome.org/show_bug.cgi?id=741946

gdk/gdkglcontext.c

index bb914f71af92e6904846e3edbb36c8298975a9ca..06f19e875fc8ba0d92aa1cebf05f5b569f6d260b 100644 (file)
@@ -419,7 +419,6 @@ gdk_gl_context_set_debug_enabled (GdkGLContext *context,
 
   g_return_if_fail (GDK_IS_GL_CONTEXT (context));
   g_return_if_fail (!priv->realized);
-  g_return_if_fail (priv->profile == GDK_GL_PROFILE_3_2_CORE);
 
   enabled = !!enabled;
 
@@ -471,6 +470,9 @@ gdk_gl_context_set_forward_compatible (GdkGLContext *context,
 {
   GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
 
+  g_return_if_fail (GDK_IS_GL_CONTEXT (context));
+  g_return_if_fail (!priv->realized);
+
   compatible = !!compatible;
 
   priv->forward_compatible = compatible;